<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
  <title>Description of sg_solvefilterparams</title>
  <meta name="keywords" content="sg_solvefilterparams">
  <meta name="description" content="SG_SOLVEFILTERPARAMS  solve Gabor filter parameters">
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta name="generator" content="m2html &copy; 2003 Guillaume Flandin">
  <meta name="robots" content="index, follow">
  <link type="text/css" rel="stylesheet" href="../m2html.css">
</head>
<body>
<a name="_top"></a>
<div><a href="../index.html">Home</a> &gt;  <a href="index.html">simplegabortb-v1.0.0</a> &gt; sg_solvefilterparams.m</div>

<!--<table width="100%"><tr><td align="left"><a href="../index.html"><img alt="<" border="0" src="../left.png">&nbsp;Master index</a></td>
<td align="right"><a href="index.html">Index for simplegabortb-v1.0.0&nbsp;<img alt=">" border="0" src="../right.png"></a></td></tr></table>-->

<h1>sg_solvefilterparams
</h1>

<h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="box"><strong>SG_SOLVEFILTERPARAMS  solve Gabor filter parameters</strong></div>

<h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="box"><strong>function [gamma, eta] = sg_solvefilterparams(k, p, m, n) </strong></div>

<h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="fragment"><pre class="comment">SG_SOLVEFILTERPARAMS  solve Gabor filter parameters

 [gamma, eta] = sg_solvefilterparams(k, p, m, n)

 This functions is intended for solving filter sharpness parameters
 gamma and eta based on other filter bank parameters. 

   k - spacing of filter frequencies
   p - filter overlap
   m - number of filter frequencies
   n - number of filter orientations

 Author: Jarmo Ilonen

 $Name: V_1_0_0 $ $Id: sg_solvefilterparams.m,v 1.3 2005-10-12 13:22:40 ilonen Exp $</pre></div>

<!-- crossreference -->
<h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
This function calls:
<ul style="list-style-image:url(../matlabicon.gif)">
</ul>
This function is called by:
<ul style="list-style-image:url(../matlabicon.gif)">
<li><a href="sg_createfilterbank.html" class="code" title="function [bank]=sg_createfilterbank(N, f, m, n, varargin)">sg_createfilterbank</a>	SG_CREATEFILTERBANK creates Gabor filter bank</li><li><a href="sg_plotfilters2.html" class="code" title="function sg_plotfilters2(N,fmax,m,n,varargin)">sg_plotfilters2</a>	SG_PLOTFILTERS2 displays Gabor filter bank</li></ul>
<!-- crossreference -->

<h2><a name="_subfunctions"></a>SUBFUNCTIONS <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<ul style="list-style-image:url(../matlabicon.gif)">
<li><a href="#_sub1" class="code">function gamma=solvegamma(k,p)</a></li><li><a href="#_sub2" class="code">function k=solvek(gamma,p)</a></li><li><a href="#_sub3" class="code">function p=solvep(gamma,k)</a></li><li><a href="#_sub4" class="code">function eta=solveeta(n,p)</a></li></ul>
<h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="fragment"><pre>0001 <span class="comment">%SG_SOLVEFILTERPARAMS  solve Gabor filter parameters</span>
0002 <span class="comment">%</span>
0003 <span class="comment">% [gamma, eta] = sg_solvefilterparams(k, p, m, n)</span>
0004 <span class="comment">%</span>
0005 <span class="comment">% This functions is intended for solving filter sharpness parameters</span>
0006 <span class="comment">% gamma and eta based on other filter bank parameters.</span>
0007 <span class="comment">%</span>
0008 <span class="comment">%   k - spacing of filter frequencies</span>
0009 <span class="comment">%   p - filter overlap</span>
0010 <span class="comment">%   m - number of filter frequencies</span>
0011 <span class="comment">%   n - number of filter orientations</span>
0012 <span class="comment">%</span>
0013 <span class="comment">% Author: Jarmo Ilonen</span>
0014 <span class="comment">%</span>
0015 <span class="comment">% $Name: V_1_0_0 $ $Id: sg_solvefilterparams.m,v 1.3 2005-10-12 13:22:40 ilonen Exp $</span>
0016 
0017 <a name="_sub0" href="#_subfunctions" class="code">function [gamma, eta] = sg_solvefilterparams(k, p, m, n)</a>
0018 
0019 
0020 gamma=<a href="#_sub1" class="code" title="subfunction gamma=solvegamma(k,p)">solvegamma</a>(k,p);
0021 eta=<a href="#_sub4" class="code" title="subfunction eta=solveeta(n,p)">solveeta</a>(n,p);
0022 
0023 
0024 
0025 <a name="_sub1" href="#_subfunctions" class="code">function gamma=solvegamma(k,p)</a>
0026 
0027 gamma=1/pi*sqrt(-log(p))*(k+1)/(k-1);
0028 
0029 
0030 
0031 <a name="_sub2" href="#_subfunctions" class="code">function k=solvek(gamma,p)</a>
0032 
0033 x=1/(gamma*pi)*sqrt(-log(p));
0034 k=(1+x)/(1-x);
0035 
0036 
0037 
0038 <a name="_sub3" href="#_subfunctions" class="code">function p=solvep(gamma,k)</a>
0039 
0040 p=exp(- ( gamma*pi * (k-1)/(k+1))^2);
0041 
0042 
0043 <a name="_sub4" href="#_subfunctions" class="code">function eta=solveeta(n,p)</a>
0044 
0045 <span class="comment">%ua=tan(pi/(no*2)) * fmax % exact ua</span>
0046 ua=pi/n/2;  <span class="comment">% ua based on approximation</span>
0047 
0048 eta=1/pi*sqrt(-log(p))/(ua);
0049 
0050</pre></div>
<hr><address>Generated on Fri 23-Nov-2007 13:14:20 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/">m2html</a></strong> &copy; 2003</address>
</body>
</html>